package com.tct.smartRE.fwk.impl.transform.event;

import java.util.Map;

import com.tct.smartRE.fwk.api.IBusinessObject;
import com.tct.smartRE.fwk.api.transform.event.ITransformationEvent;
import com.tct.smartRE.fwk.impl.transform.TransformationConstant;

public class TransformationEventTemplate implements ITransformationEvent {

	public void onConstruction(Map<String, Object> source,
			Map<String, Object> destination) {
		if (source == null || destination == null) {
			throw new IllegalArgumentException(
					"input parameter can not be null");
		}
		if (!source.containsKey(TransformationConstant.ACTION)) {
			throw new IllegalArgumentException(
					"SOURCE must contain TransformationConstant.ACTION");
		}
		if (!source.containsKey(TransformationConstant.CLASS_TYPE)) {
			throw new IllegalArgumentException(
					"SOURCE must contain TransformationConstant.CLASS_TYPE");
		}
	}

	public void onDestruction(IBusinessObject obj,
			Map<String, Object> destination) {
		if (obj == null || destination == null) {
			throw new IllegalArgumentException(
					"input parameter can not be null");
		}
	}

}
